<script>
    function info_nullify(info_id, rout, rout_url) {

        var AjaxUrl = "/post_j/nullify/" + info_id;


        $.getJSON(AjaxUrl, function (Json) {
            var obj = eval(Json);
            if (obj.nullify_info == 1) {

                if (rout_url == 'filter') {

                    router = "filter";
                    catid = obj.cat_id;
                }
                else if (rout_url == 'list') {
                    router = "list";
                    catid = obj.cat_slug;
                }
                else if (rout_url == 'tutorial') {
                    router = "catalog";
                    catid = obj.cat_slug;
                } else {
                    if (rout == 'tutorial') {
                        router = "catalog";
                        catid = obj.cat_slug;
                    }
                    else if (rout == 'info') {
                        router = "filter";
                        catid = obj.cat_id;
                    }
                    else {
                        router = "list";
                        catid = obj.cat_slug;
                    }
                }
                if (catid != '') {
                    window.location.href = '/' + router + '/' + catid;
                }
                else {
                    self.location = document.referrer;
                }
            }

            else {
            }
        });
    }
</script>

<a onclick="info_nullify('{{info_uid}}','{{info_router}}','{{url}}')" class="btn btn-xs btn-warning">
    <span class="glyphicon glyphicon-remove"></span> {{ _('Nullify') }}</a>